/**
 * 
 */
package SphericalHTM.client;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.sun.org.apache.bcel.internal.generic.NEW;

/**
 * HtmlDAO access class
 * @author Jun
 *
 */
public class HtmlDAO extends JdbcSupportDAO {

	public static final HtmlDAO instance = new HtmlDAO();
	
	private String table = "";
	
	public HtmlDAO(){
		
//		table = Configurer.getParameter("table");
		table = bundle.getString("table");
	}
	
	
//    public List<htmlcode> getHtmlCode(String where){
//		
//		Connection conn = this.getConnection();
//		String sql = String.format("select  * from %s where %s", table,where);
//		List<htmlcode> rs_html = new ArrayList<htmlcode>();
//		htmlcode tem = null;
//		try {
//			
//			PreparedStatement pstmt = conn.prepareStatement(sql);			
//			ResultSet rs = pstmt.executeQuery();
//			while(rs.next()){
//				tem = new htmlcode();
//				
//				tem.number = rs.getLong("number");
//				tem.htmcodes = rs.getLong("htmcodes");
//				tem.longitutude = rs.getDouble("longitude");
//				tem.latitude = rs.getDouble("latitude");
//				tem.location_name = rs.getString("location_name");
//				
//				rs_html.add(tem);
////				System.out.format("htmlcode:%s, longtitude :%s, latitude: %s \n",rs.getLong(1),rs.getLong(2),rs.getLong(3));
//			}
//			pstmt.close();
//			conn.close();
//			
//		} catch (SQLException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		
//		return rs_html;
//	}
}
